﻿using System;
using System.Collections.Generic;

namespace UniRx
{
	// Token: 0x0200020D RID: 525
	public class EventPattern<TSender, TEventArgs> : IEquatable<EventPattern<TSender, TEventArgs>>, IEventPattern<TSender, TEventArgs>
	{
		// Token: 0x06000C63 RID: 3171 RVA: 0x0003D309 File Offset: 0x0003B709
		public EventPattern(TSender sender, TEventArgs e)
		{
			this.Sender = sender;
			this.EventArgs = e;
		}

		// Token: 0x170000ED RID: 237
		// (get) Token: 0x06000C64 RID: 3172 RVA: 0x0003D31F File Offset: 0x0003B71F
		// (set) Token: 0x06000C65 RID: 3173 RVA: 0x0003D327 File Offset: 0x0003B727
		public TSender Sender { get; private set; }

		// Token: 0x170000EE RID: 238
		// (get) Token: 0x06000C66 RID: 3174 RVA: 0x0003D330 File Offset: 0x0003B730
		// (set) Token: 0x06000C67 RID: 3175 RVA: 0x0003D338 File Offset: 0x0003B738
		public TEventArgs EventArgs { get; private set; }

		// Token: 0x06000C68 RID: 3176 RVA: 0x0003D344 File Offset: 0x0003B744
		public bool Equals(EventPattern<TSender, TEventArgs> other)
		{
			return !object.ReferenceEquals(null, other) && (object.ReferenceEquals(this, other) || (EqualityComparer<TSender>.Default.Equals(this.Sender, other.Sender) && EqualityComparer<TEventArgs>.Default.Equals(this.EventArgs, other.EventArgs)));
		}

		// Token: 0x06000C69 RID: 3177 RVA: 0x0003D3A1 File Offset: 0x0003B7A1
		public override bool Equals(object obj)
		{
			return this.Equals(obj as EventPattern<TSender, TEventArgs>);
		}

		// Token: 0x06000C6A RID: 3178 RVA: 0x0003D3B0 File Offset: 0x0003B7B0
		public override int GetHashCode()
		{
			int hashCode = EqualityComparer<TSender>.Default.GetHashCode(this.Sender);
			int hashCode2 = EqualityComparer<TEventArgs>.Default.GetHashCode(this.EventArgs);
			return (hashCode << 5) + (hashCode ^ hashCode2);
		}

		// Token: 0x06000C6B RID: 3179 RVA: 0x0003D3E6 File Offset: 0x0003B7E6
		public static bool operator ==(EventPattern<TSender, TEventArgs> first, EventPattern<TSender, TEventArgs> second)
		{
			return object.Equals(first, second);
		}

		// Token: 0x06000C6C RID: 3180 RVA: 0x0003D3EF File Offset: 0x0003B7EF
		public static bool operator !=(EventPattern<TSender, TEventArgs> first, EventPattern<TSender, TEventArgs> second)
		{
			return !object.Equals(first, second);
		}
	}
}
